package com.tianya.action;

import java.util.Date;

import com.opensymphony.xwork2.ActionSupport;
import com.tianya.model.User;
import com.tianya.service.UserService;

@SuppressWarnings("serial")
public class RegAction extends ActionSupport {
	private UserService userSerivce;
	private String username;
	private String userpwd;
	private String realname;
	private String tel;
	private String emall;

	public String initReg() throws Exception 
	{
		User user=new User();
		user.setUsername(username);
		user.setPassword("123456");
		user.setTel(tel);
		user.setRealname(realname);
		user.setEmall(emall);
		user.setStatus(1);
		user.setUserage(30);
		user.setUsertype("一级用户");
		user.setUsesex("男");
		user.setCreatedate(new Date());
		userSerivce.adduser(user);
		return SUCCESS;
	}
	public String initRegTest() throws Exception 
	{
		return SUCCESS;
	}
	
	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getUserpwd() {
		return userpwd;
	}


	public void setUserpwd(String userpwd) {
		this.userpwd = userpwd;
	}


	public String getRealname() {
		return realname;
	}

	public void setRealname(String realname) {
		this.realname = realname;
	}

	public String getTel() {
		return tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	public String getEmall() {
		return emall;
	}

	public void setEmall(String emall) {
		this.emall = emall;
	}

	public UserService getUserSerivce() {
		return userSerivce;
	}

	public void setUserSerivce(UserService userSerivce) {
		this.userSerivce = userSerivce;
	}
}
